<?php
/**
 * Created by PhpStorm.
 * User: Administrator
 * Date: 2019/4/23 0023
 * Time: 下午 2:34
 */

namespace app\moonlighting\controller;

use app\moonlighting\service\Login as LoginService;
use think\Session;

class Login
{
    //登录页面
    public function index()
    {
        return view('index');
    }
    //登录验证
    public function checkLogin()
    {
        $info = LoginService::checkLogin();
        //设置session
        Session::set('sport_admin',$info);
        return json(['code'=>200,'msg'=>'登录成功']);
    }
}